package com.hyh.dubbozkconsume.component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.hyh.dubbo_zk.service.UserService;
import org.springframework.stereotype.Component;

@Component
public class UserComponent {


    @Reference(version = "1.0.0", interfaceName = "com.hyh.dubbo_zk.service.UserService")
    public UserService userService;

    public void getUser() {
        System.out.println(userService.getUser().getName());
    }
}
